//package com.travel.travelServer.controller1;
//
//import com.travel.travelServer.entity1.Landscapes;
//import com.travel.travelServer.entity1.vo.CommentVo;
//import com.travel.travelServer.service1.CommentService;
//import com.travel.travelServer.utils.AjaxResult;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
//@RestController
//@RequestMapping(value = "/Comment", produces = MediaType.APPLICATION_JSON_VALUE)
//public class CommentController {
//
//    @Autowired
//    CommentService commentService;
//
//    @PostMapping(value = "/addInfo")
//    public AjaxResult addInfo(@RequestBody CommentVo commentVo) {
//        return AjaxResult.success(commentService.insertComment(commentVo));
//    }
//
//    @DeleteMapping(value = "/removeInfoById/{id}")
//    public AjaxResult removeInfo(@PathVariable(value = "id") Long id) {
//        return AjaxResult.success(commentService.deleteById(id));
//    }
//
//    @GetMapping(value = "/removeInfoByIds/{ids}")
//    public AjaxResult removeInfos(@PathVariable(value = "ids") Long[] ids) {
//        return AjaxResult.success(commentService.deleteByIds(ids));
//    }
//
//    @PostMapping(value = "/editInfo")
//    public AjaxResult editInfo(@RequestBody CommentVo commentVo) {
//        return AjaxResult.success(commentService.updateComment(commentVo));
//    }
//
//    @GetMapping(value = "/getInfoById/{id}")
//    public AjaxResult getInfo(@PathVariable(value = "id") Long id) {
//        return AjaxResult.success(commentService.selectById(id));
//    }
//
//    @GetMapping(value = "/getPageInfo")
//    public AjaxResult getInfoPage(CommentVo commentVo) {
//        return AjaxResult.success(commentService.getInfoPage(commentVo));
//    }
//
//    @GetMapping(value = "/getInfoList")
//    public AjaxResult getInfoList(CommentVo commentVo) {
//        List<Landscapes> comments = commentService.selectCommentList(commentVo);
//        return AjaxResult.success(comments);
//    }
//
//}
